<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>3.背景重复和尺寸定制</title>
  <style>
    article {
      border: dashed 3px black;
      height: 500px;
      background-image: url(small.jpg);
      overflow: auto;
      background-repeat: no-repeat;
      /*background-position: -120px 50%;*/
      background-size: 100% 100%;
    }

   /* div {
      height: 3000px;
      background-image: url(small.jpg);
      background-attachment: fixed;
      background-repeat: repeat;
      background-clip: border-box;
    }*/
  </style>
</head>

<body>
  <article>
    <div>
      <h2>houdunren.com</h2>

    </div>
  </article>
</body>

</html>